package com.hxiaoyi.cloud.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * 配置RestTemplate
 * @author 黄敬意
 * @date 2022-02-02 22:13
 **/
@Configuration
public class ApplicationContextConfig {
    /**
     * @LoadBalanced赋予 RestTemplate 负载均衡的能力
     */
    @Bean
    //@LoadBalanced
    public RestTemplate getRestTemplate(){
        return  new RestTemplate();
    }
}




